let destroyId = indicator.connect('destroy', emitter => {
delete this.statusArea[role];
emitter.disconnect(destroyId);
- container.destroy();
});
indicator.connect('menu-set', this._onMenuSet.bind(this));
this._onMenuSet(indicator);
child: this.actor });
this.connect('style-changed', this._onStyleChanged.bind(this));
+ this.connect('destroy', this._onDestroy.bind(this));
+
this._minHPadding = this._natHPadding = 0.0;
},
child.allocate(childBox, flags);
},
+
+ _onDestroy() {
+ this.container.child = null;
+ this.container.destroy();
+ },
});
var Button = new Lang.Class({
this.connect('event', this._onEvent.bind(this));
this.connect('notify::visible', this._onVisibilityChanged.bind(this));
- this.connect('destroy', this._onDestroy.bind(this));
if (dontCreateMenu)
this.menu = new PopupMenu.PopupDummyMenu(this.actor);
},
_onDestroy() {
+ this.parent();
+
if (this.menu)
this.menu.destroy();
}